package com.hashbee.invite.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.hashbee.bo.ReturnData;
import com.hashbee.invite.domain.Invite;
import com.hashbee.invite.model.InvitePage;
import com.hashbee.invite.model.InviteVo;
import com.hashbee.invite.service.InviteService;

@RestController
@RequestMapping(value = "/admin/invite")
public class InviteController {

    @Autowired
    private InviteService inviteService;
    
    @RequestMapping(value="/list", method=RequestMethod.POST)
	public ReturnData<InvitePage> invitelist(@RequestBody InviteVo invite){
		return inviteService.invitelist(invite);
	}
	
    @RequestMapping(value="/save", method=RequestMethod.POST)
	public ReturnData<Invite> saveInvite(@RequestBody Invite invite){
    	return inviteService.saveInvite(invite);
	}
}
